package com.order.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.order.common.R;
import com.order.po.b_color;
import com.order.po.goods;
import com.order.po.orderlist;
import com.order.service.orderlistService;

@Controller
public class orderlistController {
	 @Autowired
	   private orderlistService orderlistService;
	 
	 @RequestMapping({"/getAllorderlist"})
	   @ResponseBody
	   public R getAllorderlist()
	   {
		 R r = R.ok().put("data", this.orderlistService.getAllorderlist());
	     return r;
	   }
	 
	 @RequestMapping({ "/insert_order" })
		@ResponseBody
		public void insert_order(orderlist g) {
			this.orderlistService.insert_order(g);
		 }
	 
	 
	   @RequestMapping({ "/delete_order" })
		@ResponseBody
		public void delete_order(String order_id) {
			this.orderlistService.delete_order(order_id);
		 }
	   
	   @RequestMapping({"/get_orderlistbypar"})
	   @ResponseBody
	   public R get_orderlistbypar(String parameter,String parameter1,String parameter2)
	   {
		 R r = R.ok().put("data", this.orderlistService.get_orderlistbypar(parameter,parameter1,parameter2));
	     return r;
	   }
	   
	   @RequestMapping({"/get_orderlistbyuser"})
	   @ResponseBody
	   public R get_orderlistbyuser(String parameter,String parameter1,String parameter2)
	   {
		 R r = R.ok().put("data", this.orderlistService.get_orderlistbyuser(parameter,parameter1,parameter2));
	     return r;
	   }
	   
	   @RequestMapping({"/update_order"})
	   	@ResponseBody
	   public void update_order(String parameter,String parameter1)
	   {
	     this.orderlistService.update_order(parameter,parameter1);
	   }
	   
	   @RequestMapping({"/update_orderhave"})
	   	@ResponseBody
	   public void update_orderhave(String parameter)
	   {
	     this.orderlistService.update_orderhave(parameter);
	   }
	   
	   @RequestMapping({"/update_paytype"})
	   	@ResponseBody
	   public void update_paytype(String parameter)
	   {
	     this.orderlistService.update_paytype(parameter);
	   }
}
